<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script>

    //圆周率
    console.log(Math.PI);
    //上下取整
    console.log(Math.ceil(1.1));
    console.log(Math.floor(1.9));
    //生成0-1之间的随机数
    console.log(Math.random()*10);
    //四舍五入
    console.log(Math.round(Math.random()*10));
    //生成一个x-y之间的随机数
    // console.log(Math.round(Math.random()*(x-y)+x);
    //获取最大值和最小值
    var m = Math.max(19,10,9,24);
    var n = Math.min(1,390,3,7,9);
    console.log(n);
    //返回x的y次幂
    var s = Math.pow(2,3);
    console.log(s);
    //开方
    console.log(Math.sqrt(4));
</script>
<body>
    
</body>
</html>